<?php 
$username = $this->session->userdata('username');
$password = $this->session->userdata('password');
if (empty($username) AND empty($password)){
	echo"..";
}else{
?>
<div id="wrappercontent">
	<div align="right">
		<a href="#jam_kerja_create" role="button" class="btn btn-danger" data-toggle="modal">Create</a>
	</div>
	<div id="demo" style="margin-top:20px;">
	<table cellpadding="0" cellspacing="0" border="0" class="table" id="example" style="font-size:12px; margin-bottom:20px;">
		<thead>
			<tr>
				<th>No</th>
				<th>Jam Masuk</th>
				<th>Jam Keluar</th>
				<th>Keterangan</th>
				<th></th>
			</tr>
		</thead>
		
		<tbody>
		<?php $i = 1 ?>
		<?php foreach($jam_kerja as $data): ?>
		<tr>
			<td><?php echo $i++ ?></td>
			<td><?php echo $data->jam_masuk ?></td>
			<td><?php echo $data->jam_keluar ?></td>
			<td>
			<?php
				if($data->b_active=='1'){
					echo"Berlaku";
				}else{
					echo"Tidak Berlaku";
				}
			?></td>
			<td>
			<div align="center">
				<?php echo anchor("login/form_update_jam_kerja/$data->id", '<i class=icon-edit></i>'); ?> | 
				<?php echo anchor("login/delete_jam_kerja/$data->id", '<i class=icon-trash></i>'); ?>
			</div>
			</td>
		</tr>
		<?php endforeach ?>
		</tbody>
	</table>
	</div>
</div>


<div id="jam_kerja_create" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="margin-top:100px;">
	<?php echo form_open('login/create_jam_kerja');?>
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		<div style="font-size:19px;">Create</div>
	</div>
	<div class="modal-body">
		<div class="row-fluid">
			<div class="span6">
			Jam Masuk
			<p style="margin-top:5px;"><input type="text" name="jam_masuk"></p>
			Jam Keluar
			<p style="margin-top:5px;"><input type="text" name="jam_keluar"></p>
			</div>
			<div class="span6">
				Actived
				<p>
					<label class="radio" style="float:left; margin-top:10px;">
						<input type="radio" name="b_active" id="b_active" value="1" checked>
						Berlaku
					</label>
					<label class="radio" style="float:left; margin-left:10px; margin-top:10px;">
						<input type="radio" name="b_active" id="b_active" value="2">
						Tidak Berlaku
					</label>
				</p>
			</div>
		</div>
	</div>
	<div class="modal-footer">
		<input type="submit" value="save" class="btn btn-danger">
	</div>
	<?php echo form_close(); ?>
</div>
<?php
}
?>